package com.wanshi.test;

import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.Scanner;

//222

//哥德巴赫猜想 : 任何一个大于2的偶数都可以拆分为两个素数的和
/*一个大于2的偶数总能表示为两个素数之和。
如4=2+2, 10=3+7
补充方法,public String aaa(int n)()
要求n是一个大于2的任意偶数,
返回第一组素数想加的字符串
比如
10000=59+9941
10000=71+9929
10000=113+9887
...........
返回字符串为第一组
10000=59+9941
*/
public class AA {

    public static double aaa(int num1,int num2,String type){
        /*switch (type){
            case "+":
               double  he =  num1 + num2;
               return he;
               break;
            case "-":
                double  cha =  num1 - num2;
                return cha;
            break;
            case "*":
                double  ji =  num1 * num2;
                return ji;
            break;
            case "/":
                double  shang =  num1 / num2;
                return shang;
            break;
            default :
                break;
        }*/
        if (type=="+"){
            double  he =  (double)(num1) + (double)(num2);
            return he;

        }else if (type == "-") {
            double  cha =  (double)(num1) - (double)(num2);
            return cha;
        }else if (type == "*") {
            double  ji =  (double)(num1) * (double)(num2);
            return ji;
        }else {
            double shang = (double)(num1) / (double)(num2);
            return shang;
        }
    }

    public static int[] t89(int[] arr){
        int[] brr = new int[arr.length];
        int left = 0;
        //4.定义变量代表偶数要存放的位置
        int right = arr.length-1;
        //5.对原数组进行遍历
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] % 2 == 1){
                //5.1如果是奇数就往左边放
                brr[left] = arr[i];
                //5.2存放之后让索引向右移动
                left++;
            }else{
                //5.3如果是偶数就往右边放
                brr[right] = arr[i];
                //5.4存放之后让索引向左移动
                right--;
            }
        }
        return brr;
    }

    public static void abc(int n){
//        for (int i =64+n; i >=65; i--) {
//            for (int a=65;a<i;a++){
//                System.out.print(" ");
//            }
//            for (int j =64+n;j>=i; j--) {
//                System.out.print((char)j);
//            }
//            System.out.println();
//        }
        //a--f  65  70

        for (int i = 0; i <6; i++) {


            //i = 0 ;  j = 70
            //i = 1     j= 69
            for (int j = 70-i; j <= 70; j++) {
                System.out.print((char)j);

            }

            System.out.println();

        }
    }



    public static void main(String[] args) {
        //int[] arr = {1,2,3,4,5,6,7};
        //System.out.println(Arrays.toString(t89(arr))  );

        //System.out.println( aaa(3,4,"+"));

        abc(5);
    }


//    public static String aaa(int n) {
//        StringBuilder sb = new StringBuilder();
//
//        for (int i = 2; i <= n / 2; i++) {
//            int j = n - i;
//
//            for (int x = 2; x < i; x++) {
//                if (i % x == 0 && j % x == 0) {
//                    sb.append(n + "=" + i + "+" + j + " ");
//                    break;
//                }
//
//            }
//
//        }
//        return sb.toString();
//    }
}
